﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
}
<link href="~/lib/layui/css/layui.css" rel="stylesheet" />
<script src="~/lib/layui/layui.js"></script>
<script src="~/js/js.cookie.js"></script>
<script src="~/js/moment.js"></script>
<script src="~/lib/jquery/dist/jquery.js"></script>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>库存清单</title>
    <!-- 请勿在项目正式环境中引用该 layui.css 地址 -->
    <link href="//unpkg.com/layui@2.9.20/dist/css/layui.css" rel="stylesheet">
</head>
<body>
    <div class="layui-row">
        <div class="layui-col-xs3">
            <div id="ID-tree-demo-showLine"></div>
        </div>
        <div class="layui-col-xs9">
            <form class="layui-form" action="">
                <div class="layui-col-xs4">
                    <div class="layui-input-group">
                        <div class="layui-input-split layui-input-prefix">
                            身高
                        </div>
                        <input type="text" placeholder="带任意前置和后置内容" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-input-group">
                        <div class="layui-input-split layui-input-prefix">
                            身高
                        </div>
                        <input type="text" placeholder="带任意前置和后置内容" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-input-group">
                        <div class="layui-input-split layui-input-prefix">
                            身高
                        </div>
                        <input type="text" placeholder="带任意前置和后置内容" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-input-group">
                        <div class="layui-input-split layui-input-prefix">
                            身高
                        </div>
                        <input type="text" placeholder="带任意前置和后置内容" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-input-group">
                        <div class="layui-input-split layui-input-prefix">
                            身高
                        </div>
                        <input type="text" placeholder="带任意前置和后置内容" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-input-group">
                        <div class="layui-input-split layui-input-prefix">
                            身高
                        </div>
                        <input type="text" placeholder="带任意前置和后置内容" class="layui-input">
                    </div>
                </div>
                <div class="layui-col-xs4">
                    <div class="layui-input-inline">
                        <button type="submit" class="layui-btn" lay-submit lay-filter="demo1">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script>

        layui.use(function () {
            var tree = layui.tree;


            $(function () {
                getTreeData();
            });
            function getTreeData() {
                $.ajax({
                    url: '@ViewBag.FoundationWrite' + '/api/ProductType/TreesList',
                    type: 'post',
                    data: JSON.stringify({}),
                    dataType: 'json',
                    contentType: "application/json",
                    success: function (res) {
                        if (res.data != null) {
                            var data = res.data;
                            // 渲染
                            tree.render({
                                elem: '#ID-tree-demo-showLine',
                                data: data,
                                showLine: false  // 是否开启连接线
                            });
                        } else {
                            layer.msg(res.msg);
                        }
                    },
                    error: function (err) {
                        layer.msg('请求失败，请稍后再试');
                    }
                });
            }


        });

    </script>
</body>
</html>